<?
    require_once("cms/core/action/AbstractListAction.php");

    class ListAction extends AbstractListAction {

        private $log;

        public function __construct() {
            $this->log =& LoggerManager::getLogger("ListAction");
        }

        public function delete(ActionConfig &$mapping, &$form, Request &$request, Response &$response) {

            $this->log->debug("Deleting newsletters");
            $c = new Criteria();
            $c->add(NewsletterPeer::NEWSLETTER_ID, $form->getItems(), Criteria::IN);
            try {
                NewsletterPeer::doDelete($c);
                $this->messages->add(ActionMessage::GLOBAL_MESSAGE,
                    new ActionMessage("list.success.delete", true));
            } catch(PropelException $e) {
                $this->errors->add(ActionMessage::GLOBAL_MESSAGE,
                    new ActionMessage("list.error.delete", true));
                $this->log->error($e->getMessage());
            }

        }

    }
?>